import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/update',
    method: 'post',
    data: row
  })
}

export const getPatrolSList = (current, size, params) => {
  return request({
    url: '/api/patroContentLibrary/contentlibrary/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 生成二维码
export const generateCode = (id) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/generateCode',
    method: 'post',
    params: {
      id
    }
  })
}

export const getDwmcList = (dwlx) => {
  return request({
    url: '/api/patrolPointCustomSettings/pointcustomsettings/getDwmcList',
    method: 'get',
    params: {
      dwlx
    }
  })
}
